package com.ysq.excavator.service;

import java.util.List;

import com.ysq.excavator.entity.LuceneField;
import com.ysq.excavator.entity.QueryAttribute;

/**
 * lucene 管理
 * @author Administrator
 *
 */
public interface LuceneService {

	/**
	 * 分页查找所有 documents
	 * @param start
	 * @param indexPath
	 * @return
	 */
	String findAllDocuments(QueryAttribute queryAttr,int limit,int start,String indexPath);
	
	/**
	 * 获得 lucene 索引目录树
	 * @return
	 */
	String getLuceneTreeJson();
	
	/**
	 * 根据 id 删除lucene index
	 * @param contentidList
	 */
	String deleteIndexById(String indexPath,List<Long> contentidList);
	
	/**
	 * 插入一条新数据
	 * @param indexPath
	 * @param docFieldList
	 */
	String insertOneDocument(String indexPath,List<LuceneField> docFieldList);
	
	/**
	 * 通过contentid 查出相应数据
	 * @param indexPath
	 * @param contentid
	 * @return
	 */
	String getDataById(String indexPath,String contentid);
	
	/**
	 * 修改数据
	 * @param indexPath
	 * @param docFieldList
	 * @return
	 */
	String updateOneDocument(String indexPath,List<LuceneField> docFieldList);
}
